package callabletest;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;

public class Main {

    public static void main(String[] args) throws ExecutionException, InterruptedException {

        FutureTask<String> futureTask = new FutureTask<>(new MyCallable());


        new Thread(futureTask).start();

        String s = futureTask.get();
        System.out.println(s);

    }

}
